package com.klod.data.services

import com.klod.data.bean.BannerDetailBean
import com.klod.data.repository.BannerRepository
import org.koin.core.annotation.Single

@Single
class HomeServices(
    private val bannerRepository: BannerRepository
) {

    suspend fun getBanners() = bannerRepository.findAllBanners()

    suspend fun getBanner(id: Int) = bannerRepository.findBannerById(id)

    suspend fun addBanner(banner: BannerDetailBean)= bannerRepository.addBanner(banner)

    suspend fun deleteBanner(id: Int) =
        bannerRepository.removeBanner(id)


}